package com.gitee.neuray.security.admin.org.biz;

import com.gitee.neuray.security.common.exception.BaseException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Map;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;
import tk.mybatis.mapper.common.Mapper;
import com.gitee.neuray.security.common.biz.BaseBiz;

import com.gitee.neuray.security.admin.org.mapper.AdminOrgMapper;
import com.gitee.neuray.security.admin.org.entity.AdminOrgEntity;


@Service
@Transactional(rollbackFor = Exception.class)
public class AdminOrgBiz extends BaseBiz<AdminOrgMapper,AdminOrgEntity> {

    @Autowired
    private AdminOrgMapper adminOrgMapper;

    @Override
    protected String getPageName() {
        return "AdminOrg"+"Biz";
    }

    public AdminOrgEntity getAdminOrg(String id){
        if(StringUtils.isEmpty(id)){
            throw new BaseException("id不能为空...");
        }
       return adminOrgMapper.getAdminOrgById(id);
    }
}
